package cn.itsource.ymcc.openfeign;

import cn.itsource.ymcc.domain.CourseDoc;
import cn.itsource.ymcc.openfeign.fallbackfactory.EsCourseOpenFeignFallbackFactory;
import cn.itsource.ymcc.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "service-search",fallbackFactory = EsCourseOpenFeignFallbackFactory.class )
public interface EsCourseOpenFeign {
    @PostMapping("/saveCourseDocs")
    public JsonResult saveCourseDoc(@RequestBody List<CourseDoc> courseDocs);

    @GetMapping("/deleteCourseDoc/{id}")
    public JsonResult deleteCourseDoc(@PathVariable("id")Long id);

    @GetMapping("/queryOne/{id}")
    public JsonResult queryOne(@PathVariable("id")Long id);
}
